<div class="row">

    <div class="col-md-12">      		
    	
    	<div class="widget stacked ">
    
            <div class="widget-header">
                <i class="icon-list"></i>
                <h3><?php echo isset($title_for_layout)?$title_for_layout:$this->l('List of consultation type'); ?></h3>
            </div> <!-- /.widget-header -->
            
            <div class="widget-content">

                <form action="<?php echo base_url('Cpannel/Consultation/Type/'); ?>" method="get" style="width: 100%;">
                    <div class="form-group">
						<span class="col-md-8">
                            <a class="btn btn-success" href="<?php echo base_url('Cpannel/Consultation/Type/add'); ?>"><?php echo $this->l('Add a consultation type'); ?></a>
                        </span>
                        
                        <div id="search" class="col-md-4">
                            <label class="col-md-4" for="inputquery" style=" line-height: 34px; ">
    							<?php echo $this->l('Search'); ?>
    						</label>
                        
                            <div class="input-group">
                                <input id="inputquery" class="form-control" type="text" name="q" value="<?php echo $q; ?>" />
                                <span class="input-group-btn">
                                    <button class="btn btn-primary" type="submit"><?php echo $this->l('Go!'); ?></button>
                                </span>
    					    </div><!-- /input-group -->
						</div>
                        <input type="hidden" name="filter_reset" value="1" />
                        <input type="hidden" name="order_reset" value="1" />
                    </div>
                    <div class="clearfix"></div>
                </form>
                
                <section id="tables">
                    <div class="page-header">
                        <h3><?php echo $this->l('List of users'); ?></h3>
                    </div>
                    
                    <div class="table-responsive">
                        <table class="table table-bordered table-hover table-striped">
                            <thead>
                                <tr>
                                    <th><a href="<?php echo base_url('Cpannel/Consultation/Type/?q='). urlencode($q) .'&order_by=id_type&order_way='. (($order_by == 'id_type' && $order_way == 'DESC')?'ASC':'DESC'); ?>"><?php echo $this->l('#'); ?><?php echo (($order_by == 'id_type')?(($order_way == 'DESC')?' (v)':' (^)'):''); ?></a></th>
                                    <th><a href="<?php echo base_url('Cpannel/Consultation/Type/?q='). urlencode($q) .'&order_by=label&order_way='. (($order_by == 'label' && $order_way == 'DESC')?'ASC':'DESC'); ?>"><?php echo $this->l('Label'); ?><?php echo (($order_by == 'label')?(($order_way == 'DESC')?' (v)':' (^)'):''); ?></a></th>
                                    <th><a href="<?php echo base_url('Cpannel/Consultation/Type/?q='). urlencode($q) .'&order_by=tarif&order_way='. (($order_by == 'tarif' && $order_way == 'DESC')?'ASC':'DESC'); ?>"><?php echo $this->l('Tarif'); ?><?php echo (($order_by == 'tarif')?(($order_way == 'DESC')?' (v)':' (^)'):''); ?></a></th>
                                    <th><a href="<?php echo base_url('Cpannel/Consultation/Type/?q='). urlencode($q) .'&order_by=duration&order_way='. (($order_by == 'duration' && $order_way == 'DESC')?'ASC':'DESC'); ?>"><?php echo $this->l('Duration'); ?><?php echo (($order_by == 'duration')?(($order_way == 'DESC')?' (v)':' (^)'):''); ?></a></th>
                                    <th><a href="javascript:;"><?php echo $this->l('Description'); ?></a></th>
            						<th class="td-actions" width="140"></th>
                                </tr>
                            </thead>
                            <tbody>
                        		<?php foreach ($items as $k => $v): ?>
                        			<tr>
                        				<td><?php echo $v->id_type; ?></td>
                        				<td><?php echo $v->label; ?></td>
                        				<td><?php echo $v->tarif; ?></td>
                        				<td><?php echo $v->duration; ?></td>
                        				<td><?php echo substr(strip_tags($v->description), 0, 200); ?></td>
                						<td class="td-actions">
                							<a href="<?php echo base_url('Cpannel/Consultation/Type/edit/?id='. (int)$v->id_type); ?>" title="<?php echo $this->l('Edit'); ?>" class="btn btn-xs btn-primary">
                								<i class="btn-icon-only icon-edit"></i>										
                							</a>
                							<a href="<?php echo base_url('Cpannel/Consultation/Type/delete/?id='. (int)$v->id_type); ?>" title="<?php echo $this->l('Delete'); ?>" class="btn btn-xs btn-primary msgbox-confirm">
                								<i class="btn-icon-only icon-remove"></i>										
                							</a>
                						</td>
                        			</tr>
                        		<?php endforeach ?>
                            </tbody>
                        </table>
                    </div> <!-- /.table-responsive -->

                    <?php include(((BASEPATH == '/')?'':dirname(BASEPATH)).'/'.APPPATH.'views/Templates/pagination.php'); ?>
                    
                </section>
    			
    		</div> <!-- /widget-content -->
    			
    	</div> <!-- /widget -->
    	
    </div> <!-- /span12 -->

</div> <!-- /row -->